<%@ page language="java" contentType="text/html; charset=US-ASCII"
    pageEncoding="US-ASCII"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">

<script language="text/javascript" src="scripts/Calendar.js"></script> 

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css" />
    
     <script src="Scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.validate.wrapper.js" type="text/javascript"></script>
    
    <script> 		   		
    		$(document).ready(function()
    		{
    		    $("#FromDate").datepicker({
    		    	minDate: 0,
    		    	numberOfMonths: 1,
    		    	dateFormat: 'yy-mm-dd', 
    		        onSelect: function(selected) 
    		        {
    		        	$("#ToDate").datepicker("option","minDate", selected);
    		        }
    		    
    		       });
    		    
    		    $("#ToDate").datepicker({ 
    		    	numberOfMonths: 1,
    		      dateFormat: 'yy-mm-dd', 
    		        onSelect: function(selected) 
    		        {
    		           /*  $("#FromDate").datepicker({minDate:0}); */
    		            $("#FromDate").datepicker("option","maxDate", selected);
    		        }
    		    });  
    		});
    </script>	
<title>Make A Booking</title>
</head>
<body>
<form action="MakeABooking2.jsp" method="get" >
Facility Type: <select name="type"  id="type" onchange="location.href='MakeABooking?type=' + this.value;" >
  <option value=""> </option>
  <option value="Auditorium"> Auditorium</option>
  <option value="MPH">MPH</option>
  <option value="DiscussionRoom">DiscussionRoom</option>
  <option value="ClassRoom">ClassRoom</option>
  <option value="MeetingRoom">MeetingRoom</option>
</select><br><br>
</form>
<form action="/JavaCA/MakeABookingDateFilter" id="FormToValidate" method="post">
Available Facilities : <br>
<table cellspacing="6" cellpadding="2" border="1"  >
       <tr>
       <th align="center" bgcolor="EBE8E9">FacilityName</th>
       <th align="center" bgcolor="EBE8E9">FacilityID</th>       
       <th align="center" bgcolor="EBE8E9">Type</th>
       <th align="center" bgcolor="EBE8E9">Description</th>
       <th align="center" bgcolor="EBE8E9">Capacity</th>
       </tr>
     <c:forEach var="fa" items="${List}">
        <tr>
            
            <td><input type="radio" id="facName" name="facName" value="${fa.facilityName}" >${fa.facilityName}</td>
            <td align="center">${fa.facilityID}</td>          
            <td align="center">${fa.type}</td>
            <td align="center">${fa.description}</td>
            <td align="center">${fa.capacity}</td>
<!--             <td><input type="radio" name="check" value="" ></td>    -->       
        </tr>
    </c:forEach>
</table>
<br><br>

FromDate:
 <input type="text" id="FromDate" name="fDate" onSelect="location.href='MakeABooking?fromDate'+this.value;"/>
<br><br>
ToDate:
 <input type="text" id="ToDate" name="tDate" onSelect="location.href='MakeABooking?toDate'+this.value;"/>
<br><br>


Priority: <select id="priority" name="priorityvalue">
  <option value=""> </option>
  <option value="High">High</option>
  <option value="Medium">Medium</option>
  <option value="Low">Low</option>
</select>
<br><br>
Reason:<br><textarea name="reasonvalue" cols="30" rows="4"></textarea>
<br><br>
Emergency:
<input type="checkbox" name="emergencyvalue" value="Y">
 <br><br>
<input type="submit" value="Submit" id="btnValidate"></form>
<c:if test="${not empty '${Message}'}">
	<h3 ><c:out value="${Message}"/></h3>
</c:if>
</body>
</html>